home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1468 / stopwtch.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-07-20  |  2.9 KB  |  107 lines

  1. VERSION 4.00
  2. Begin VB.Form Stopwatch 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Stopwatch"
  5.    ClientHeight    =   1065
  6.    ClientLeft      =   60
  7.    ClientTop       =   4020
  8.    ClientWidth     =   3570
  9.    Height          =   1470
  10.    Icon            =   "Stopwtch.frx":0000
  11.    Left            =   0
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   1065
  17.    ScaleWidth      =   3570
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   3675
  20.    Width           =   3690
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "Close"
  23.       Height          =   315
  24.       Left            =   2640
  25.       TabIndex        =   4
  26.       Top             =   660
  27.       Width           =   735
  28.    End
  29.    Begin VB.CommandButton cmdReset 
  30.       Caption         =   "Reset"
  31.       Height          =   315
  32.       Left            =   1800
  33.       TabIndex        =   3
  34.       Top             =   660
  35.       Width           =   735
  36.    End
  37.    Begin VB.CommandButton cmdStop 
  38.       Caption         =   "Stop"
  39.       Height          =   315
  40.       Left            =   960
  41.       TabIndex        =   2
  42.       Top             =   660
  43.       Width           =   735
  44.    End
  45.    Begin VB.CommandButton cmdStart 
  46.       Caption         =   "Start"
  47.       Height          =   315
  48.       Left            =   120
  49.       TabIndex        =   1
  50.       Top             =   660
  51.       Width           =   735
  52.    End
  53.    Begin VB.Timer Timer1 
  54.       Enabled         =   0   'False
  55.       Interval        =   20
  56.       Left            =   120
  57.       Top             =   720
  58.    End
  59.    Begin VB.PictureBox picLCD 
  60.       BackColor       =   &H00008000&
  61.       ForeColor       =   &H00800000&
  62.       Height          =   375
  63.       Left            =   120
  64.       ScaleHeight     =   315
  65.       ScaleWidth      =   3195
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   3255
  69.    End
  70. Attribute VB_Name = "Stopwatch"
  71. Attribute VB_Creatable = False
  72. Attribute VB_Exposed = False
  73. Option Explicit
  74. Dim moLCD   As New CLCD
  75. Dim mlCount As Long
  76. Private Sub cmdReset_Click()
  77.     Timer1.Enabled = False
  78.     mlCount = 10000
  79.     moLCD.Caption = "1,000.0"
  80. End Sub
  81. Private Sub cmdStart_Click()
  82.     Timer1.Enabled = True
  83. End Sub
  84. Private Sub cmdStop_Click()
  85.     Timer1.Enabled = False
  86. End Sub
  87. Private Sub Command1_Click()
  88.     Unload Me
  89. End Sub
  90. Private Sub Form_Load()
  91.     mlCount = 10000
  92.     With moLCD
  93.         .BackColor = &H808080
  94.         .ForeColor = &H800000
  95.         Set .Container = picLCD
  96.         .Caption = "1,000.0"
  97.     End With
  98. End Sub
  99. Private Sub Form_Unload(Cancel As Integer)
  100.     Set moLCD = Nothing
  101.     Set Stopwatch = Nothing
  102. End Sub
  103. Private Sub Timer1_Timer()
  104.     mlCount = mlCount + 1
  105.     moLCD.Caption = Format$(mlCount / 10, "###,###,##0.0")
  106. End Sub
  107.